<include file="public@header" />
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li><a href="{:url('Banner/index')}">轮播图管理</a></li>
        <li class="active"><a href="{:url('Banner/edit')}">编辑轮播图</a></li>
    </ul>
    <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:url('Banner/editPost')}">
        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>轮播图</label>
            <div class="col-md-6 col-sm-10">
                <input id="photo-1" type="hidden" name="image" value="{$banner.image}" >
                <input id="photo-1-name" type="text" name="photo_name" title="图片名称" disabled readonly>
                <div>
                    <img src="/upload/{$banner.image}" id="photo-1-preview" width="100px" style="margin-top: 15px" >
                </div>
                <div>
                    <a style="margin-top: 15px"  class="btn btn-primary" href="javascript:uploadOneImage('图片上传','#photo-1');">上传</a>
                </div>
            </div>
        </div>


        <div class="form-group">
            <label class="col-sm-2 control-label"><span class="form-required">*</span>跳转链接</label>
            <div class="col-md-6 col-sm-10">
                <input style="width: 150px;" type="text" class="form-control" name="url" value="{$banner.url}">
            </div>
        </div>
        <input type="hidden" value="{$banner.id}" name="id">
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <input type="hidden" name="__token__" value="{:token()}" />
                <button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
                <a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
            </div>
        </div>
    </form>
</div>
<script src="__STATIC__/js/admin.js?v={$_static_version}"></script>
</body>
</html>
